﻿using System;
using System.Collections;


using mborn.Model;

namespace mborn.DAL
{
    public class UserDAL
    {
        private EntityControl control;

        public UserDAL()
        {
            control = EntityControl.CreateEntityControl("Model");
        }

        public void AddUser(User user)
        {
            control.AddEntity(user);
        }

        public void UpdateUser(User user, int ID)
        {
            control.UpdateEntity(user, user.ID);
        }

        public void DeleteUser(User user)
        {
            control.DeleteEntity(user);
        }

        public IList GetAllUsers(string strHQL)
        {
            return control.GetEntities(strHQL);
        }
    }
}
